//
//  QShowSubChooseView.m
//  QoilPublic
//
//  Created by 杨凯 on 16/11/23.
//  Copyright © 2016年 杨凯. All rights reserved.
//

#import "QShowSubChooseView.h"

@interface QShowSubChooseView()

@property (weak, nonatomic) IBOutlet UIImageView *imgView;


@property (weak, nonatomic) IBOutlet UILabel *contentLabel;

@property (weak, nonatomic) IBOutlet UIButton *cancelBtn;

@property (weak, nonatomic) IBOutlet UIButton *agreeBtn;
@property (weak, nonatomic) IBOutlet UIView *bacView;

@end
@implementation QShowSubChooseView

- (void)awakeFromNib{
    
    [super awakeFromNib];
    self.bacView.layer.cornerRadius = 4.0;
    
}

- (void)setImg:(UIImage *)img{
    
    _img = img;
    _imgView.image = _img;
}

- (void)setContent:(NSString *)content{
    
    _content = content;
    _contentLabel.text = _content;
}

- (void)setLeftTitle:(NSString *)leftTitle{
    
    _leftTitle = leftTitle;
    [_cancelBtn setTitle:_leftTitle forState:UIControlStateNormal];
}

- (void)setRightTitle:(NSString *)rightTitle{

    _rightTitle = rightTitle;
    [_agreeBtn setTitle:_rightTitle forState:UIControlStateNormal];
}

- (IBAction)cancelAction:(id)sender {
    if(self.block){
        self.block(0);
    }
}

- (IBAction)agreeAction:(id)sender {
    if(self.block){
        self.block(1);
    }
}





@end
